﻿
namespace Enferno.Public.Web.Models
{
    public interface ICheckoutPayerModel<TAddressModel>
        where TAddressModel: AddressModel
    {
        TAddressModel InvoiceAddress { get; set; }
    }

    public abstract class CheckoutPayerBaseModel<TAddressModel> : ICheckoutPayerModel<TAddressModel>
        where TAddressModel: AddressModel
    {
        public int? CustomerId { get; set; }
        public TAddressModel InvoiceAddress { get; set; }
    }

    public class CheckoutCompanyPayerModel : CheckoutCompanyPayerBaseModel<CompanyInformationModel, AddressModel>
    {
        
    }

    public class CheckoutCompanyPayerBaseModel<TCompanyInformationModel, TAddressModel> : CheckoutPayerBaseModel<TAddressModel>
        where TCompanyInformationModel: CompanyInformationModel
        where TAddressModel: AddressModel
    {
        public int? CompanyId { get; set; }
        public string CompanyCode { get; set; }
        public string OrganisationNumber { get; set; }
        public TCompanyInformationModel CompanyInformation { get; set; }
    }

    public class CheckoutPrivatePayerModel : CheckoutPrivatePayerBaseModel<PersonInformationModel, AddressModel>
    {
        
    }


    public class CheckoutPrivatePayerBaseModel<TPersonInformationModel, TAddressModel> : CheckoutPayerBaseModel<TAddressModel>
        where TPersonInformationModel: PersonInformationModel
        where TAddressModel: AddressModel
    {
        public string SocialSecurityNumber { get; set; }
        public TPersonInformationModel PersonInformation { get; set; }
    }
}
